---
id: 660f4cffb1459d45e34902d1
title: Step 97
challengeType: 1
dashedName: step-97
---

# --description--

You can actually build the inverted pyramid without needing to loop "backwards" like you did.

To do this, you'll need to learn a couple of new array methods. Start by using `const` to declare a `numbers` variable. Assign it an array with the elements `1`, `2`, and `3`. Then log the `numbers` array.

# --hints--

You should use `const` to declare a `numbers` variable.

```js
assert.match(code, /const\s+numbers/);
```

Your `numbers` variable should be an array.

```js
assert.isArray(numbers);
```

Your `numbers` array should have the elements `1`, `2`, and `3` in that order.

```js
assert.deepEqual(numbers, [1,2,3]);
```

You should log your `numbers` array.

```js
assert.match(code, /console\.log\(\s*numbers\s*\);?/);
```

# --seed--

## --seed-contents--

```js
const character = "#";
const count = 8;
const rows = [];

function padRow(rowNumber, rowCount) {
  return " ".repeat(rowCount - rowNumber) + character.repeat(2 * rowNumber - 1) + " ".repeat(rowCount - rowNumber);
}

// TODO: use a different type of loop
/*for (let i = 1; i <= count; i++) {
  rows.push(padRow(i, count));
}*/

/*while (rows.length < count) {
  rows.push(padRow(rows.length + 1, count));
}*/

/*for (let i = count; i > 0; i--) {
  rows.push(padRow(i, count));
}*/

--fcc-editable-region--

--fcc-editable-region--

let result = ""

for (const row of rows) {
  result = result + "\n" + row;
}

console.log(result);
```
